<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddLogsToSends extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('sends', function (Blueprint $table) {
            $table->boolean("has_exception")->comment("是否出现发送异常")->default(false)->nullable();
            $table->text("exception_msg")->comment("异常信息")->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('sends', function (Blueprint $table) {
            $table->dropColumn("has_exception");
            $table->dropColumn("exception_msg");
        });
    }
}
